<template>
    <div>
        <div class="search-form">
            <el-form inline>
                <el-form-item label="商品名字">
                    <el-input size="small" placeholder="输入的内容" />
                </el-form-item>
                <el-form-item label="状态">
                    <el-select placeholder="选择状态" size="small">
                        <el-option value="">请选择</el-option>
                        <el-option value="1">上架</el-option>
                        <el-option value="2">下架</el-option>
                        <el-option value="3">删除</el-option>
                    </el-select>
                </el-form-item>
                <el-form-item label="日期">
                    <el-date-picker placeholder="选择日期" size="small" type="date"></el-date-picker>
                </el-form-item>
                <el-form-item label="日期区间">
                    <el-date-picker size="small" placeholder="选择日期" type="daterange" range-separator="至"></el-date-picker>
                </el-form-item>
                <el-form-item label="分类">
                    <el-cascader size="small" :options="city"></el-cascader>
                </el-form-item>
                <el-form-item>
                    <el-button size="small" icon="el-icon-search" type="danger">搜索</el-button>
                </el-form-item>
            </el-form>
        </div>
        <div class="toolbar">
            <el-button type="primary" icon="el-icon-plus" size="small">添加</el-button>
        </div>
        <el-table :data="list" :border="true" >
            <el-table-column prop="id" label="ID"></el-table-column>
            <el-table-column prop="goods_name" label="商品名称"></el-table-column>
            <el-table-column label="图片">
                <template slot-scope="scope">
                    <el-image :src="scope.row.goods_image"/>
                </template>
            </el-table-column>
            <el-table-column prop="price" label="价格"></el-table-column>
            <el-table-column prop="weight" label="重量"></el-table-column>
            <el-table-column prop="createTime" label="创建时间"></el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
                  <el-button size="small" type="danger">操作</el-button>
                </template>
            </el-table-column>
        </el-table>
        <div class="page">
            <el-pagination layout="total,prev,pager,next,jumper" :total="total" page-size="5"></el-pagination>
        </div>
    </div>
</template>
<script>
export default {
    name:"ProTable",
    props:{
        list:{
            type:Array,
            default:[],
        },
        total:{
            type:Number,
        }
    }
}
</script>